package com.course.web.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Min;

/**
 * Created by Justin on 2017/6/6.
 */
@Data
@EqualsAndHashCode(of = {"id"})
public class SpecInfoVM implements HasID {
    @Min(0)
    private int id;
    @NotEmpty
    private String title;
    @Min(0)
    private int parts;
    private boolean locked;

    public void lock() {
        locked = true;
    }
}
